package yyy;
//201521123103
import java.util.Scanner;
import java.util.regex.Pattern;
public class Main {
	private static Pattern pattern = Pattern.compile("-?\\d+");
	public static void main(String[] args){
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			String str1 = sc.next();
			System.out.println(pattern.matcher(str1).matches());
		}
	}
}